import { defineStore } from 'pinia'

const useProject = defineStore('project', {
  state: () => {
    return {
      queryDay: '',
      projectInfo: {},
    }
  },
  persist: {
    storage: sessionStorage,
    paths: ['projectInfo'],
  },
  getters: {
    getQueryDay(state) {
      return state.queryDay
    },
    getProjectInfo(state) {
      return state.projectInfo
    },
  },
  actions: {
    setQueryDay(data) {
      this.queryDay = data
    },
    setProjectInfo(data) {
      this.projectInfo = data
    },
  },
})

export default useProject
